div {
    float: left;
    width: 48%;
    height: 50px;
    margin: 5px;
}
div:nth-child(even) {
    background-color: red;
}
div:nth-child(odd) {
    background-color: green;
}